<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/css.css" />
<title>Log Room</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
	var math;
	function upload() {
		if (document.getElementById("logdataup").value) {
			if (math == document.getElementById("logdataup").value) {
				alert("请不要输入重复数据");
			} else {
				var k = document.getElementById("logdataload").value;
				math = document.getElementById("logdataup").value;
				var currDate = new Date();
				k = k + math + "\n" + currDate.toLocaleString() + "\n";
				document.getElementById("logdataload").value = k;
				setFocusLast(logdataload);
			}
		} else {
			alert("请不要输入空白");
		}
	}
	function setFocusLast(obj) {
		obj.focus();
		var r = obj.createTextRange();
		r.moveStart("character", obj.value.length);
		r.collapse(true);
		r.select();
	}
</script>
</head>
<body>
	<jsp:include page="/jsp/uppage.jsp" flush="true">
		<jsp:param name="user" value="${user}" />
	</jsp:include>
	<div align="center">
		<jsp:include page="/jsp/menuList.jsp" flush="true" />
		<div>
			<textarea id="logdataload" name="logdataload"
				style="left: 200px; width: 670px; height: 300px; resize: none;"
				readonly></textarea>
			<form action="login.do" method="post">
				<textarea id="logdataup"
					style="left: 200px; width: 670px; height: 100px; resize: none;"></textarea>
				<br> <input type="button" id="uptobd" value="提交"
					onclick="upload()">
			</form>
		</div>
	</div>
	<jsp:include page="/jsp/bottom.jsp" flush="true" />
</body>
</html>